Repository navigation
fix(app-shell): AI-draft notice and discard on the Hooks tab, paired actions and OWD rows - #38285
Draft
objectstack-fleet[bot] wants to merge 6 commits into
Draft
objectstack-fleet[bot] wants to merge 6 commits into
objectstack-fleet[bot] wants to merge 6 commits into
Conversation
…raft (failing first) Claude-Session: https://claude.ai/code/session_01L9qibxGxp6swERUK2T9NML Co-Authored-By: Claude <noreply@anthropic.com>
…ction and an OWD row gets the designers' line and discard Claude-Session: https://claude.ai/code/session_01L9qibxGxp6swERUK2T9NML Co-Authored-By: Claude <noreply@anthropic.com>
…d, and model the publish in the AI-draft pins Claude-Session: https://claude.ai/code/session_01L9qibxGxp6swERUK2T9NML Co-Authored-By: Claude <noreply@anthropic.com>
…raft line and confirm Claude-Session: https://claude.ai/code/session_01L9qibxGxp6swERUK2T9NML Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:objectstack#3 · os-tesla · session_01L9qibwsYQqi3TBx2SFE978 L1-b, the seat's L1 thread for zone o3-studio · 2026-11-28T11:42Z 席位核对 — L1 ACCEPT @
|
This was referenced Nov 28, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Tesla · project thread
Fixes #36660
repo:objectstack#3 · os-tesla · session_01L9qibxGxp6swERUK2T9NML
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
objectHooksBuffer.ts,ObjectHooksPanel.tsx):readDraftChanges) names the AI assistant (isAgentDraftSurface: copilot or MCP). The set clears on an object switch and on a successful save.StudioAiDraftNoticewhen its draft is the AI's and the hook is not a new one. The notice's discard calls the buffer's newdiscardAiDraft.discardAiDraftasksengine.studio.aiDraft.discardConfirmUnsavedonly when the hook holds unsaved edits. It then callsclient.reset('hook', name, { state: 'draft', packageId }), the hook's own package, re-reads the list and emits the metadata refresh. A failure readsengine.studio.aiDraft.discardFailed.pairObjectActions.ts,ObjectActionsPanel.tsx):aiDraft. A successful save, and a discard, put the row back to its live form.discardAiDraft(name)asks only when that row holds an unsaved edit. It resets at the package the ensure door answers (pairForWrite()), never a hand-built<base>.customname, then reloads.PackageOwdOverviewPanel.tsx), seat ruling Q1 = A:engine.studio.owd.aiDraftNotice: the whole object has the AI's unpublished changes, and saving this row makes all of them live. The plain "unpublished" chip is not shown beside it.client.reset('object', name, { state: 'draft', packageId })). It asksengine.studio.owd.aiDraftDiscardConfirmUnsavedonly when that row holds an unsaved edit. Other rows' unsaved edits are kept across the re-read.StudioAiDraftNotice.tsx: an optionaltextprop, for a page that names what the draft covers. Without it the item sentence shows, as before.studionamespace, en + zh): the two OWD keys above. Changeset36660-owd-ai-draft-notice.md:@object-ui/i18npatch.@object-ui/app-shellis private.Tests
Three new files, 19 cases. Each covers the AI line for copilot and for MCP, no line for a person's draft or for a draft read with no provenance, discard with nothing unsaved (no confirm, one reset at the right package), and discard over an unsaved edit both declined and confirmed.
ObjectHooksPanel.aiDraftNotice-36660.test.tsx(7): through the Hooks tab host and the top bar's Save. Save publishes the AI version and the line goes away.DataPillar.pairActionsAiDraft-36660.test.tsx(6): a read-only base object with a paired package. The reset names the door's pair.PackageOwdOverviewPanel.aiDraftNotice-36660.test.tsx(6): the row's OWD sentence, the whole object's reset, and another row's unsaved edit surviving a discard.Acceptance notes
ITEM_LOCKED). The HTTP doors refuse a copilot surface, so the draft's provenance was stamped as copilot in the stored draft row, and the served read confirmeddraftChanges[].by = copilot.Verification
Failing first, then green
Unable to find … studio-ai-draft-discard×9,studio-ai-draft-notice×6.Ablation
Two parts removed on disk and restored (blob equal to HEAD afterwards): the OWD put-back of other rows' edits, and the hooks agent-surface check (any draft counts). 3 failed, 10 passed: OWD "another row keeps its edit", and hooks "a person's own pending draft" and "no provenance".
Wider runs
@object-ui/app-shelltsc --noEmitexit 0,tsc -p tsconfig.test.jsonexit 0. ESLint on the changed files: 0 errors, 5 warnings that were already there.dispatch-gates --ranaccounted.pnpm --dir ui exec vitest run scripts/: 172 files passed, 2 skipped.overlap-check: clean againstorigin/mainand feat(app-shell): a create with no named package asks to pick or create one #38204 (shares the studio i18n files).Browser reading, real console build
Vite console against a showcase backend, signed in, Studio → package → organization-wide defaults. Two objects in the package. The one with a copilot-stamped draft shows under its name: "This object has unpublished changes from the AI assistant. Saving this row makes all of them live too." with "Discard the AI’s changes" (1 line, 1 button). The other object's row shows no line.
Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibxGxp6swERUK2T9NML